<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Pepr3D: D:/Home/MFF/1-Mgr/projekt/pepr3d/src/tools/TextEditor.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pepr3d_icon.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Pepr3D
   &#160;<span id="projectnumber">v1.0</span>
   </div>
   <div id="projectbrief">Pepr3D is a 3D graphics editor designed for FDM printing</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_text_editor_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">TextEditor.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;cinder/app/AppBase.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;geometry/FontRasterizer.h&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;tools/Tool.h&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;ui/IconsMaterialDesign.h&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;ui/MainApplication.h&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;ui/SidePane.h&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacepepr3d.html">pepr3d</a> {</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html">   15</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpepr3d_1_1_text_editor.html">TextEditor</a> : <span class="keyword">public</span> <a class="code" href="classpepr3d_1_1_tool.html">Tool</a> {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;   <span class="keyword">public</span>:</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    <a class="code" href="classpepr3d_1_1_text_editor.html">TextEditor</a>(<a class="code" href="classpepr3d_1_1_main_application.html">MainApplication</a>&amp; app) : mApplication(app) {</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <span class="keyword">auto</span> fontPath = cinder::app::getAssetPath(<span class="stringliteral">&quot;fonts/OpenSans-Regular.ttf&quot;</span>);</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        mFont = fontPath.filename().string();</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        mFontPath = fontPath.string();</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    }</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#a89d5554aba18be49d5e8f13c1729e3b0">   23</a></span>&#160;    <span class="keyword">virtual</span> std::string <a class="code" href="classpepr3d_1_1_text_editor.html#a89d5554aba18be49d5e8f13c1729e3b0">getName</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        <span class="keywordflow">return</span> <span class="stringliteral">&quot;Text Editor&quot;</span>;</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#a45e0186c35d934adc4af68640074d44e">   27</a></span>&#160;    <span class="keyword">virtual</span> std::optional&lt;Hotkey&gt; <a class="code" href="classpepr3d_1_1_text_editor.html#a45e0186c35d934adc4af68640074d44e">getHotkey</a>(<span class="keyword">const</span> <a class="code" href="classpepr3d_1_1_hotkeys.html">Hotkeys</a>&amp; hotkeys)<span class="keyword"> const override </span>{</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <span class="keywordflow">return</span> hotkeys.<a class="code" href="classpepr3d_1_1_hotkeys.html#af57c6eb43b445e2f94f5777c216186d7">findHotkey</a>(HotkeyAction::SelectTextEditor);</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    }</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#ad7adaa2d3f7104bface2115407ea3ef3">   31</a></span>&#160;    <span class="keyword">virtual</span> std::string <a class="code" href="classpepr3d_1_1_text_editor.html#ad7adaa2d3f7104bface2115407ea3ef3">getIcon</a>()<span class="keyword"> const override </span>{</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        <span class="keywordflow">return</span> ICON_MD_TEXT_FIELDS;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    }</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a770ea44d818d1ff06f11ac14268be555">isEnabled</a>() <span class="keyword">const override</span>;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a0bb2481c00c38ff55eab21baa66624dc">drawToSidePane</a>(<a class="code" href="classpepr3d_1_1_side_pane.html">SidePane</a>&amp; sidePane) <span class="keyword">override</span>;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#ac670b5620dda898d049c395c5b899b3f">onModelViewMouseDown</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView, ci::app::MouseEvent event) <span class="keyword">override</span>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a7598ba82ef36ae87f0317fe18c800bcb">onModelViewMouseMove</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView, ci::app::MouseEvent event) <span class="keyword">override</span>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#aae35d8a952efd0493c5a12031054b783">drawToModelView</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView) <span class="keyword">override</span>;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#a2e868d665405249a775466848e5ac6ad">   42</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a2e868d665405249a775466848e5ac6ad">onToolSelect</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView)<span class="keyword"> override </span>{</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordflow">if</span>(!mTriangulatedText.empty() &amp;&amp; mSelectedIntersection) {</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;            <a class="code" href="classpepr3d_1_1_text_editor.html#a6215bc1584a7ec5a7591f286f153891b">updateTextPreview</a>();</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        }</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    }</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#a20b497c331cb642819f366b4689aff1b">   48</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a20b497c331cb642819f366b4689aff1b">onToolDeselect</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView)<span class="keyword"> override </span>{</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        modelView.resetPreview();</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    }</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#a0c7d5a45e94fd87a930b127c1f816deb">   52</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a0c7d5a45e94fd87a930b127c1f816deb">onNewGeometryLoaded</a>(<a class="code" href="classpepr3d_1_1_model_view.html">ModelView</a>&amp; modelView)<span class="keyword"> override </span>{</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        mCurrentIntersection = {};</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        mSelectedIntersection = {};</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    }</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a477667ab0ee9ea117e196d0b045d69b1">paintText</a>();</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;   <span class="keyword">private</span>:</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="classpepr3d_1_1_main_application.html">MainApplication</a>&amp; mApplication;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#a0bf4101cffb4567e68c2ee19ed1476f1">   64</a></span>&#160;    ci::Ray <a class="code" href="classpepr3d_1_1_text_editor.html#a0bf4101cffb4567e68c2ee19ed1476f1">mSelectedRay</a>{};</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    std::optional&lt;size_t&gt; mSelectedIntersection{};</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    glm::vec3 mSelectedIntersectionPoint{};</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#accf4f63e05399a24062d88ce13c1056b">   69</a></span>&#160;    ci::Ray <a class="code" href="classpepr3d_1_1_text_editor.html#accf4f63e05399a24062d88ce13c1056b">mCurrentRay</a>{};</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    std::optional&lt;size_t&gt; mCurrentIntersection{};</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    glm::vec3 mCurrentIntersectionPoint{};</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    std::string mFont;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    std::string mFontPath;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    std::string mText = <span class="stringliteral">&quot;Pepr3D&quot;</span>;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordtype">int</span> mFontSize = 12;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keywordtype">int</span> mBezierSteps = 3;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keywordtype">float</span> mFontScale = 0.2f;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#ab8655ad98860f317999f61e16eaf28cf">   81</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="classpepr3d_1_1_text_editor.html#ab8655ad98860f317999f61e16eaf28cf">mTextRotation</a> = 0.f;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classpepr3d_1_1_text_editor.html#a367eed1983f4cd98bc465206ac2bf6ee">   84</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a367eed1983f4cd98bc465206ac2bf6ee">TEXT_DISTANCE_SCALE</a> = 0.02f;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    std::vector&lt;std::vector&lt;FontRasterizer::Tri&gt;&gt; mTriangulatedText;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    std::vector&lt;std::vector&lt;FontRasterizer::Tri&gt;&gt; mRenderedText;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    std::vector&lt;std::vector&lt;FontRasterizer::Tri&gt;&gt; triangulateText() <span class="keyword">const</span>;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a8e848393dc43187cfe5e89833fc61a91">createPreviewMesh</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a4d708589412de7f0bf3c0bd0a76efe9c">generateAndUpdate</a>();</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a6215bc1584a7ec5a7591f286f153891b">updateTextPreview</a>();</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classpepr3d_1_1_text_editor.html#a811d714a58f7f3cc06d271fc1e3b223f">rotateText</a>(std::vector&lt;std::vector&lt;FontRasterizer::Tri&gt;&gt;&amp; text);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordtype">void</span> rescaleText(std::vector&lt;std::vector&lt;FontRasterizer::Tri&gt;&gt;&amp; result);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    glm::vec3 <a class="code" href="classpepr3d_1_1_text_editor.html#a8b6e697183b6df4f7c571015b32f1032">getPlaneBaseVector</a>(<span class="keyword">const</span> glm::vec3&amp; direction) <span class="keyword">const</span>;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    glm::vec3 <a class="code" href="classpepr3d_1_1_text_editor.html#aa111e897d281d8f936378ae278ef2eb9">getPreviewOrigin</a>(<span class="keyword">const</span> glm::vec3&amp; direction) <span class="keyword">const</span>;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;};</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;}  <span class="comment">// namespace pepr3d</span></div><div class="ttc" id="classpepr3d_1_1_text_editor_html_ad7adaa2d3f7104bface2115407ea3ef3"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#ad7adaa2d3f7104bface2115407ea3ef3">pepr3d::TextEditor::getIcon</a></div><div class="ttdeci">virtual std::string getIcon() const override</div><div class="ttdoc">Returns a UTF-8 icon from an icon font.</div><div class="ttdef"><b>Definition:</b> TextEditor.h:31</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_aae35d8a952efd0493c5a12031054b783"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#aae35d8a952efd0493c5a12031054b783">pepr3d::TextEditor::drawToModelView</a></div><div class="ttdeci">virtual void drawToModelView(ModelView &amp;modelView) override</div><div class="ttdoc">Called every frame on a currently active Tool. Draw to ModelView from inside this method.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:287</div></div>
<div class="ttc" id="namespacepepr3d_html"><div class="ttname"><a href="namespacepepr3d.html">pepr3d</a></div><div class="ttdoc">Fix for CGAL bugs in polygon with holes verification Contained in CGAL PR #3688, likely to be in 4....</div><div class="ttdef"><b>Definition:</b> CmdColorManager.h:9</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a6215bc1584a7ec5a7591f286f153891b"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a6215bc1584a7ec5a7591f286f153891b">pepr3d::TextEditor::updateTextPreview</a></div><div class="ttdeci">void updateTextPreview()</div><div class="ttdoc">Update text preview without generating again.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:87</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a367eed1983f4cd98bc465206ac2bf6ee"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a367eed1983f4cd98bc465206ac2bf6ee">pepr3d::TextEditor::TEXT_DISTANCE_SCALE</a></div><div class="ttdeci">const float TEXT_DISTANCE_SCALE</div><div class="ttdoc">How far should the text preview placed from the model (normalized by model scale)</div><div class="ttdef"><b>Definition:</b> TextEditor.h:84</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a0bb2481c00c38ff55eab21baa66624dc"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a0bb2481c00c38ff55eab21baa66624dc">pepr3d::TextEditor::drawToSidePane</a></div><div class="ttdeci">virtual void drawToSidePane(SidePane &amp;sidePane) override</div><div class="ttdoc">Called every frame on a currently active Tool. Draw to SidePane from inside this method.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:182</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a477667ab0ee9ea117e196d0b045d69b1"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a477667ab0ee9ea117e196d0b045d69b1">pepr3d::TextEditor::paintText</a></div><div class="ttdeci">void paintText()</div><div class="ttdoc">Paint prepared text onto the model.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:261</div></div>
<div class="ttc" id="classpepr3d_1_1_tool_html"><div class="ttname"><a href="classpepr3d_1_1_tool.html">pepr3d::Tool</a></div><div class="ttdoc">A base class of all tools that the user can select and manipulate the Geometry and application with t...</div><div class="ttdef"><b>Definition:</b> Tool.h:18</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a7598ba82ef36ae87f0317fe18c800bcb"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a7598ba82ef36ae87f0317fe18c800bcb">pepr3d::TextEditor::onModelViewMouseMove</a></div><div class="ttdeci">virtual void onModelViewMouseMove(ModelView &amp;modelView, ci::app::MouseEvent event) override</div><div class="ttdoc">Called on a currently active Tool when users moves mouse cursor over a ModelView. Note: This method i...</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:281</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a8e848393dc43187cfe5e89833fc61a91"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a8e848393dc43187cfe5e89833fc61a91">pepr3d::TextEditor::createPreviewMesh</a></div><div class="ttdeci">void createPreviewMesh() const</div><div class="ttdoc">Update modelView's preview data with new triangles to render.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:10</div></div>
<div class="ttc" id="classpepr3d_1_1_hotkeys_html"><div class="ttname"><a href="classpepr3d_1_1_hotkeys.html">pepr3d::Hotkeys</a></div><div class="ttdoc">All hotkeys and their corresponding actions.</div><div class="ttdef"><b>Definition:</b> Hotkeys.h:176</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a45e0186c35d934adc4af68640074d44e"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a45e0186c35d934adc4af68640074d44e">pepr3d::TextEditor::getHotkey</a></div><div class="ttdeci">virtual std::optional&lt; Hotkey &gt; getHotkey(const Hotkeys &amp;hotkeys) const override</div><div class="ttdoc">Returns an associated Hotkey or an empty value. Use hotkeys.findHotkey() method.</div><div class="ttdef"><b>Definition:</b> TextEditor.h:27</div></div>
<div class="ttc" id="classpepr3d_1_1_hotkeys_html_af57c6eb43b445e2f94f5777c216186d7"><div class="ttname"><a href="classpepr3d_1_1_hotkeys.html#af57c6eb43b445e2f94f5777c216186d7">pepr3d::Hotkeys::findHotkey</a></div><div class="ttdeci">std::optional&lt; Hotkey &gt; findHotkey(HotkeyAction action) const</div><div class="ttdoc">Returns a hotkey for a certain action.</div><div class="ttdef"><b>Definition:</b> Hotkeys.h:184</div></div>
<div class="ttc" id="classpepr3d_1_1_model_view_html"><div class="ttname"><a href="classpepr3d_1_1_model_view.html">pepr3d::ModelView</a></div><div class="ttdoc">The main part of the user interface, shows the geometry to the user.</div><div class="ttdef"><b>Definition:</b> ModelView.h:19</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_ac670b5620dda898d049c395c5b899b3f"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#ac670b5620dda898d049c395c5b899b3f">pepr3d::TextEditor::onModelViewMouseDown</a></div><div class="ttdeci">virtual void onModelViewMouseDown(ModelView &amp;modelView, ci::app::MouseEvent event) override</div><div class="ttdoc">Called on a currently active Tool when users presses a mouse button over a ModelView.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:247</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a770ea44d818d1ff06f11ac14268be555"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a770ea44d818d1ff06f11ac14268be555">pepr3d::TextEditor::isEnabled</a></div><div class="ttdeci">virtual bool isEnabled() const override</div><div class="ttdoc">Returns true if enabled and can be selected, otherwise false. This should be a fast method,...</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:243</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a20b497c331cb642819f366b4689aff1b"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a20b497c331cb642819f366b4689aff1b">pepr3d::TextEditor::onToolDeselect</a></div><div class="ttdeci">virtual void onToolDeselect(ModelView &amp;modelView) override</div><div class="ttdoc">Called on a Tool right after user selects another tool. Note: It may also be called when a user selec...</div><div class="ttdef"><b>Definition:</b> TextEditor.h:48</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a4d708589412de7f0bf3c0bd0a76efe9c"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a4d708589412de7f0bf3c0bd0a76efe9c">pepr3d::TextEditor::generateAndUpdate</a></div><div class="ttdeci">void generateAndUpdate()</div><div class="ttdoc">Generate text and update preview.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:82</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_ab8655ad98860f317999f61e16eaf28cf"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#ab8655ad98860f317999f61e16eaf28cf">pepr3d::TextEditor::mTextRotation</a></div><div class="ttdeci">float mTextRotation</div><div class="ttdoc">Rotation of text in degrees.</div><div class="ttdef"><b>Definition:</b> TextEditor.h:81</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a811d714a58f7f3cc06d271fc1e3b223f"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a811d714a58f7f3cc06d271fc1e3b223f">pepr3d::TextEditor::rotateText</a></div><div class="ttdeci">void rotateText(std::vector&lt; std::vector&lt; FontRasterizer::Tri &gt;&gt; &amp;text)</div><div class="ttdoc">Rotate to face ray direction.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:59</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a89d5554aba18be49d5e8f13c1729e3b0"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a89d5554aba18be49d5e8f13c1729e3b0">pepr3d::TextEditor::getName</a></div><div class="ttdeci">virtual std::string getName() const override</div><div class="ttdoc">Returns a short name, displayed e.g., in a side pane and tooltip.</div><div class="ttdef"><b>Definition:</b> TextEditor.h:23</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_accf4f63e05399a24062d88ce13c1056b"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#accf4f63e05399a24062d88ce13c1056b">pepr3d::TextEditor::mCurrentRay</a></div><div class="ttdeci">ci::Ray mCurrentRay</div><div class="ttdoc">Intersection and point used for cursor highlight.</div><div class="ttdef"><b>Definition:</b> TextEditor.h:69</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a2e868d665405249a775466848e5ac6ad"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a2e868d665405249a775466848e5ac6ad">pepr3d::TextEditor::onToolSelect</a></div><div class="ttdeci">virtual void onToolSelect(ModelView &amp;modelView) override</div><div class="ttdoc">Called on a Tool right after user selects it. Note: It may also be called when a user selects the sam...</div><div class="ttdef"><b>Definition:</b> TextEditor.h:42</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_aa111e897d281d8f936378ae278ef2eb9"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#aa111e897d281d8f936378ae278ef2eb9">pepr3d::TextEditor::getPreviewOrigin</a></div><div class="ttdeci">glm::vec3 getPreviewOrigin(const glm::vec3 &amp;direction) const</div><div class="ttdoc">Get origin point of the text preview.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:173</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a8b6e697183b6df4f7c571015b32f1032"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a8b6e697183b6df4f7c571015b32f1032">pepr3d::TextEditor::getPlaneBaseVector</a></div><div class="ttdeci">glm::vec3 getPlaneBaseVector(const glm::vec3 &amp;direction) const</div><div class="ttdoc">Get vector perpendicular to the direction, that is pointing towards the right halfplane.</div><div class="ttdef"><b>Definition:</b> TextEditor.cpp:155</div></div>
<div class="ttc" id="classpepr3d_1_1_main_application_html"><div class="ttname"><a href="classpepr3d_1_1_main_application.html">pepr3d::MainApplication</a></div><div class="ttdoc">The main Cinder-based application, represents a window, handles events, thread pool,...</div><div class="ttdef"><b>Definition:</b> MainApplication.h:38</div></div>
<div class="ttc" id="classpepr3d_1_1_side_pane_html"><div class="ttname"><a href="classpepr3d_1_1_side_pane.html">pepr3d::SidePane</a></div><div class="ttdoc">Right side of the user interface that displays options of the currently selected tool.</div><div class="ttdef"><b>Definition:</b> SidePane.h:13</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a0c7d5a45e94fd87a930b127c1f816deb"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a0c7d5a45e94fd87a930b127c1f816deb">pepr3d::TextEditor::onNewGeometryLoaded</a></div><div class="ttdeci">virtual void onNewGeometryLoaded(ModelView &amp;modelView) override</div><div class="ttdoc">Called on EVERY Tool right after a new Geometry is loaded or imported.</div><div class="ttdef"><b>Definition:</b> TextEditor.h:52</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html_a0bf4101cffb4567e68c2ee19ed1476f1"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html#a0bf4101cffb4567e68c2ee19ed1476f1">pepr3d::TextEditor::mSelectedRay</a></div><div class="ttdeci">ci::Ray mSelectedRay</div><div class="ttdoc">Intersection and point used for for text projection.</div><div class="ttdef"><b>Definition:</b> TextEditor.h:64</div></div>
<div class="ttc" id="classpepr3d_1_1_text_editor_html"><div class="ttname"><a href="classpepr3d_1_1_text_editor.html">pepr3d::TextEditor</a></div><div class="ttdoc">A tool used for painting texts on a model.</div><div class="ttdef"><b>Definition:</b> TextEditor.h:15</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_1563a38af0d3a5e4a6330d6d45e9792a.html">tools</a></li><li class="navelem"><b>TextEditor.h</b></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
